﻿using System;
using FreeSql.DataAnnotations;
using ZhonTai.Admin.Core.Entities;
using ZhonTai.Industry.Domain.ProductionLine;

namespace ZhonTai.Industry.Domain.WorkStation
{
    /// <summary>
    /// 工站配置
    /// </summary>
    /// <remarks>工站配置</remarks>
    [Table(Name = "cfg_work_station"), Index("Index_{TableName}_Id", "Id", true), Index("Index_{TableName}_StationCode", "StationCode", true)]
    public partial class WorkStationEntity : EntityBase
    {
        /// <summary>
        /// 工站代号
        /// </summary>
        /// <remarks>工站代号</remarks>
        [Column(StringLength = 50)]
        public string StationCode { get; set; }

        /// <summary>
        /// 工站名称
        /// </summary>
        /// <remarks>工站名称</remarks>
        [Column(StringLength = 100)]
        public string StationName { get; set; }

        /// <summary>
        /// 所属产线
        /// </summary>
        /// <remarks>所属产线</remarks>
        [Column(Precision = 64)]
        public long LineId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Column(Precision = 64)]
        public int Sort { get; set; }

        /// <summary>
        /// 工站类型
        /// </summary>
        /// <remarks>工站类型</remarks>
        [Column(StringLength = 50)]
        public string StationType { get; set; }

        /// <summary>
        /// 设备清单
        /// </summary>
        /// <remarks>设备清单</remarks>
        [Column(StringLength = 255)]
        public string EquipmentList { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 最大产能（件/小时）
        /// </summary>
        /// <remarks>最大产能（件/小时）</remarks>
        [Column(Precision = 64)]
        public int Capacity { get; set; }

        /// <summary>
        /// 单件生产周期
        /// </summary>
        /// <remarks>单件生产周期</remarks>
        [Column(Precision = 64)]
        public decimal CycleTime { get; set; }

        /// <summary>
        /// 班次数量
        /// </summary>
        /// <remarks>班次数量</remarks>
        [Column(Precision = 64)]
        public int ShiftCount { get; set; }

        /// <summary>
        /// 工作小时数
        /// </summary>
        /// <remarks>工作小时数</remarks>
        [Column(Precision = 64)]
        public int WorkHours { get; set; }

        /// <summary>
        /// 工站位置
        /// </summary>
        /// <remarks>工站位置</remarks>
        [Column(StringLength = 64)]
        public string Location { get; set; }

        /// <summary>
        /// 启用时间
        /// </summary>
        /// <remarks>启用时间</remarks>

        public DateTime StartTime { get; set; }
        /// <summary>
        /// 停用时间
        /// </summary>
        /// <remarks>停用时间</remarks>

        public DateTime EndTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        /// <remarks>备注</remarks>
        [Column(StringLength = 64)]
        public string Remarks { get; set; }

        [Navigate(nameof(LineId))]
        public ProductionLineEntity ProductionLine { get; set; }
    }
}